package routers

import (
	"express/handler/controller"
	"express/middlewares"
	"github.com/gin-gonic/gin"
)

func Users(e *gin.Engine) {
	r2Group := e.Group("/")
	r2Group.Use(middlewares.Logger(), middlewares.Limiter(1))
	{
		c := &controller.GetNumber{}
		d := &controller.GetEtcd{}
		e := &controller.Student{}
		//r.POST("/publish", c.GetNumber)
		//测试  获取所有用户
		r2Group.GET("/get_number", c.GetNumber)
		//获取按天的单号
		r2Group.GET("/get_today_number", c.GetTodayNumber)
		//etcd 存
		r2Group.GET("/newl_etcd", d.NewlEtcd)
		//存入数据
		r2Group.GET("/set_number", c.SetNumber)
		//es
		r2Group.GET("/es_list", e.EsList)

	}

}
